#!/usr/bin/env python
# -*- coding: UTF-8 -*-

# Magpie - an open source discussion forum system.
#
# Copyright (C) 2009 The Magpie Team
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from django.conf.urls.defaults import *

urlpatterns = patterns('ajiaojr.magpie.views',
  (r'^$', 'main_view'),
  (r'^about.php$', 'about'),
  (r'^admin/', include('ajiaojr.magpie.urls.admin')),
  (r'^f/', include('ajiaojr.magpie.urls.forum')),
  (r'^fav/', include('ajiaojr.magpie.urls.favourite')),
  (r'^games/', include('ajiaojr.magpie.urls.games')),
  (r'^left.php$', 'left'),
  (r'^main.php$', 'main_view'),
  (r'^right.php$', 'right'),
  (r'^p/', include('ajiaojr.magpie.urls.post')),
  (r'^pm/', include('ajiaojr.magpie.urls.private_message')),
  (r'^profile/$', 'profile'),
  (r'^services/', include('ajiaojr.magpie.urls.services')),
  (r'^t/(?P<post_id>\d+)/$', 'thread'),
  (r'^t/(?P<post_id>\d+)/(?P<starting_index>.+)/$', 'thread'),
  (r'^u/(?P<key_name>.+)/$', 'user'),
)

handler404 = 'ajiaojr.magpie.views.page_not_found'
handler500 = 'ajiaojr.magpie.views.server_error'
